package com.fuchenyang.sentinel.provider.controller;

import com.fuchenyang.common.ResultTool;
import com.fuchenyang.common.util.JsonResult;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/provider")
@Slf4j
public class ProviderController {

    @SneakyThrows
    @GetMapping("/a")
    public JsonResult a() {
        Thread.sleep(3000);
        log.info("This is ProviderController`a method!");
        return ResultTool.success("This is ProviderController`a method!");
    }


    @GetMapping("/b")
    public JsonResult b() {
        log.info("This is ProviderController`b method!");
        return ResultTool.success("This is ProviderController`b method!");
    }
}
